package domain;

import java.util.Set;

public class POJOFactory {

	public static Contact createNewContactInstance(String firstName,
			String lastName, String email, Address address, 
			Set<ContactGroup> books, Set<PhoneNumber> profiles){
				Contact contact = new Contact();
				contact.setFirstName(firstName);
				contact.setLastName(lastName);
				contact.setEmail(email);
				contact.setAddress(address);
				contact.setBooks(books);
				contact.setProfiles(profiles);
				return contact;
	}
	
	public static Address createNewAddressInstance(String street,String city,
			String zip, String country){
		Address address = new Address();
		address.setStreet(street);
		address.setCity(city);
		address.setZip(zip);
		address.setCountry(country);
		return address;
	}
	
	public static PhoneNumber createNewPhoneNumberInstance(String phoneKind,
			String phoneNumber, Contact contact){
		PhoneNumber phone= new PhoneNumber();
		phone.setPhoneKind(phoneKind);
		phone.setPhoneNumber(phoneNumber);
		phone.setContact(contact);
		return phone;
	}
	
	public static Entreprise createNewEntrepriseInstance(String firstName,
			String lastName, String email, Address address, 
			Set<ContactGroup> books, Set<PhoneNumber> profiles,
			long numSiret){
		Entreprise entreprise = new Entreprise();
		entreprise.setFirstName(firstName);
		entreprise.setLastName(lastName);
		entreprise.setEmail(email);
		entreprise.setAddress(address);
		entreprise.setBooks(books);
		entreprise.setProfiles(profiles);
		entreprise.setNumSiret(numSiret);
		return entreprise;
	}
}